import dao.BookDao;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.BookService;
import service.Impl.BookServiceImpl;

public class test1 {
    @Test
    public void testSave(){
        //获取IoC容器
        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
        //获取bean
        BookDao bookDao=(BookDao)ctx.getBean("bookDao");

        bookDao.save();

    }

}
